<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width,initial-scale=1.0"/>
    <title>团长分捡单</title>
    <style>
        .shopClass {
            margin-top: 30px;
        }

        table {
            width: 100%;
        }

        table td {
            border: 1px solid #0a0000;
            display: table-cell;
        }

        table th {
            border: 1px solid #0a0000;
        }
    </style>
</head>
<body style="font-family: SimSun;">
<div th:each="shopPo,shopPoStat : ${shopPoList}">
    <div>
        <p>请通过好想你团长端小程序里面的电话信息联系客户</p>
    </div>
    <table class="shopClass" cellspacing="0" cellpadding="0">
        <tr>
            <td style="width: 20%;" th:text="${#dates.format(shopPo.createTime,'yyyy-MM-dd HH:mm')}">2020/03/19
                12:00:00
            </td>
            <td style="width: 22%;" th:text="${shopPo.shopName}"> 测试店铺</td>
            <td style="width: 30%;" th:text="${shopPo.address}">测试地址</td>
            <td style="width: 13%;" th:text="${shopPo.realName}">测试店长</td>
            <td th:text="${shopPo.mobile}">13585175397</td>
            <td th:v-text="${shopPoStat.last}"></td>
        </tr>
    </table>
    <table cellspacing="0" cellpadding="0">
        <thead>
        <th style="width: 14%;">收货人姓名</th>
        <th style="width: 15%;">收货人手机号</th>
        <th style="width: 40%;">品名</th>
        <th style="width: 7%;">数量</th>
        <th style="width: 7%;">金额</th>
        <th>备注</th>
        </thead>
        <tbody>
        <th:block th:each="po : ${shopPo.poList}">
            <tr th:each="item,itemStat: ${po.details}">
                <td th:text="${po.receiver}" th:if="${itemStat.index==0}" th:rowspan="${po.size}" align="center"
                    valign="middle">平价超市(太平洋保险)田新玲
                </td>
                <td th:text="${po.mPhone}" th:if="${itemStat.index==0}" th:rowspan="${po.size}" align="center"
                    valign="middle">13585175397
                </td>
                <td th:text="${item.title}" align="center" valign="middle">【限时特价，只此一小时】金锣五花肉半价特卖！金锣精品气调五花肉自然块</td>
                <td th:text="${item.num}" align="center" valign="middle">1</td>
                <td th:text="${item.productAmount}" align="center" valign="middle">1</td>
                <td align="center" valign="middle"></td>
            </tr>
        </th:block>
        <tr>
            <td colspan="3" style="text-align: right">汇总</td>
            <td align="center" valign="middle" th:text="${shopPo.count}"></td>
            <td align="center" th:text="${shopPo.amount}" valign="middle"></td>
            <td align="center" valign="middle"></td>
        </tr>
        </tbody>
    </table>
    <div th:if="${not shopPoStat.last}" style="page-break-after:always; border:0px solid black;"></div>
    <div th:if="${not shopPoStat.last}" style="page-break-before:always; border:0px solid black;"></div>
</div>
</body>
</html>
